Skip to content

Conversation

@guillaumemichel
Copy link
Collaborator

Adjust DHT Server FIND_NODE handling to match the IPFS DHT Spec ipfs/specs#497.

Changes:

  • Don't send provider record for self nor requester in a FIND_NODE response
    • Unless the FIND_NODE request exactly matches the peer id of self or requester (and requester is in the peerstore)
  • Code simplifications

- restore safety check for self in closestPeersToQuery with debug logging
- add spec-referencing comments for self and requester filtering
- clarify FIND_PEER exception that allows self/requester in response
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guillaumemichel lgtm, pushed updates to comments and restored one defensive check we had in old version

i'm going to ship this in Kubo 0.38.0-rc2 to catch any unintended consequences early

@lidel lidel changed the title adjust FIND_NODE response exceptions refactor: adjust FIND_NODE response exceptions Sep 26, 2025
@lidel lidel merged commit 861573b into master Sep 26, 2025
9 checks passed
@guillaumemichel guillaumemichel deleted the findnode-exceptions branch September 26, 2025 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants